home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Neurons
/
Flip-Flop Neurons
next >
Wrap
Text File
|
1998-10-26
|
1KB
|
44 lines
; Simple Neural Oscillators
; Flip-flop
; This forms the most elementary neural oscillator. If the input
; is 'a then 'b is formed, and if the input is 'b then 'a is
; formed.
(def-neuron flip-flop
(in 1 'a) 'b
(in 1 'b) 'a
)
; (feedback-neuron 'flip-flop 5 '((a b)))
; --> ((b a) (a b) (b a) (a b) (b a))
; To extend this to cope with other symbols use otherwise to
; return a randon 'a or 'b. Note that the picking is made
; only the first time other than 'a and 'b is found, and
; the subsequent oscillations will change this symbol, since
; it is in the range of the rules.
(def-neuron flip-flop
(in 1 'a) 'b
(in 1 'b) 'a
(otherwise (pick-random '(a b)))
)
; (feedback-neuron 'flip-flop 5 '((a b c)))
; --> ((b a a) (a b b) (b a a) (a b b) (b a a))
; To make a random symbol appear use different symbol than the
; rules can recognise, for example:
(def-neuron flip-flop
(in 1 'a) 'b
(in 1 'b) 'a
(otherwise (pick-random '(c d)))
)
(feedback-neuron 'flip-flop 5 '((a b c)))
--> ((b a c) (a b c) (b a d) (a b c) (b a c))